fix(packages-fetch): add Send bound to download_file_with_progress callbacks - #1295
Conversation
…llbacks The download_file_with_progress function takes a dyn FnMut callback, but without an explicit Send bound the async block in staged_install fails the Send check on MSRV 1.94.1. Add Send to all three internal signatures. Follow-up to PR 1293. Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 28 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
PR #1293 switched
staged_install()to usedownload_file_with_progress()for progress reporting during toolchain downloads. However, thedyn FnMutcallback parameter lacked an explicit+ Sendbound, causing the MSRV (1.94.1) CI check to fail:This affected every caller of
staged_install()acrossfbuild-toolchain(arm, avr, esp32, riscv, rp2040, etc.).Fix
Add
+ Sendto theon_progressparameter in all three internal signatures:download_file_with_progressdownload_file_with_progress_usingdownload_file_with_progress_timedThe closures at the call sites already capture only
Sendtypes (String), so they satisfy the bound.Testing
soldr cargo check -p fbuild-packages-fetch -p fbuild-toolchain— compiles cleansoldr cargo clippy -p fbuild-packages-fetch -- -D warnings— cleansoldr cargo test -p fbuild-packages-fetch -- downloader— all 15 tests passFollow-up to #1293.
Closes #1286
🤖 Generated with Claude Code